import { MessageOutlined } from '@ant-design/icons';
import { history, useModel } from '@umijs/max';
import { Badge } from 'antd';
const Message = () => {
  const { count } = useModel('useGlobal', (global) => {
    return { count: global.count };
  });
  return (
    <span
      style={{ height: '48.0px', lineHeight: '40.0px', fontSize: '14.0px', marginLeft: '16.0px' }}
      onClick={() => {
        history.push({
          pathname: '/message',
        });
      }}
    >
      <Badge offset={[10, -6]} overflowCount={10} size="small" count={count}>
        <MessageOutlined />
      </Badge>
    </span>
  );
};

export default Message;
